<template>
	<div class="flex-container table-header">
		<div v-if="showIndex" class="header-item" style="width: 40px;"></div>
		<div v-for="(v,k) in data" class="header-item" style="flex: 1;">
			{{v.title}}
		</div>
	</div>
		
</template>

<script>
	export default {
		props:{
			showIndex:Boolean
		},
		data:function(){
			return {
				data:this.$parent.$data.header
			}
		}
	}
</script>

<style>
	.table-header{
		height: 45px;
		line-height: 45px;
		background-color: #f7f5f5;
		-webkit-box-flex: 1;
		border-bottom: 1px solid #dadada;
		color: #949494;
		font-weight: bold;
		
	}
	
	.header-item{
		cursor: pointer;
		padding: 0 8px;
	}
</style>
